package org.he.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.he.basic.domain.BaseDomain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author He
 * @date 2023/11/28  15:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget("employees")
public class Department extends BaseDomain implements Serializable {
    @ApiModelProperty(value = "部门编号")
    @Excel(name = "部门编号",isColumnHidden = true)
    private Long id;

    @Excel(name = "部门名字",width = 15)
    @ApiModelProperty(value = "部门名字")
    private String name;

    @ApiModelProperty(value = "部门介绍")
    
    private String intro;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "部门创建时间")
    
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "部门更新时间")
    
    private Date updateTime;

    @ApiModelProperty(value = "部门经理")
    
    private Employee manager;

    @ApiModelProperty(value = "父级部门")
    
    private Department parent;

    @ApiModelProperty(value = "部门路径")
    
    private String path;

    @ApiModelProperty(value = "部门状态")
    
    private Integer state;

    // 儿子不可能只有一个,所以应该用集合
    
    private List<Department> children;


}
